import {AxiosRequestConfig} from "axios";
import getAxiosInstance     from "@/common/AxiosInstance";
import {Get}                from "@/common/RequestMethod";

const baseURL: string = "/config";

// 请求配置
const axiosRequestConfig: AxiosRequestConfig = {
	baseURL,
	timeout: 30 * 1000,
};

// 请求接口
const instance = getAxiosInstance(axiosRequestConfig);

const api = {
	getApps: "/apps"
};

const config = {
	getApps() {
		return Get(instance, api.getApps);
	}
};

export default config;
export {
	baseURL,
	instance,
	config
};
